package cn.wuyi.common.context;

import java.io.Serializable;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class ContextParameter implements Serializable{
	
	/**
	 * @Fields serialVersionUID | long
	 */
	private static final long serialVersionUID = -3926673683568786218L;

	private static Logger log = LoggerFactory.getLogger(ContextParameter.class);
	
	public static final String PLATFORM_DOMAIN_PROPERTY = "platform.domain";
	
	
	
	
	//后台不需要区分pc和mobile时，去默认值 0
	public static final Integer DEFAULT_VIEW_TYPE = 0;
	
	public static final Integer PC_VIEW_TYPE = 1;
	
	public static final Integer MOBILE_VIEW_TYPE = 2;
	
	public static final Integer FRONT_SOURCE_APP = 1;
	
	public static final Integer BACK_END_SOURCE_APP = 2;
	
	//网站暂停：7;关闭：9;启用：6
	public static final Integer SITE_PAUSED = 7;
	
	public static final Integer SITE_CLOSED = 9;
	
	public static final Integer SITE_NO_CREATED = 8;
	
	public static final Integer SITE_RUNNING = 6;
	
	public static final String MOBILE_RUNNING_PROPERTY = "mobileRunning";
	
	public static final String PC_RUNNING_PROPERTY = "pcRunning";
	
	public static final String PC_AND_MOBILE_RUNNING_PROPERTY = "pcAndMobileRunning";
	
	//上下文中用到的属性描述
	public static final String VIEW_TYPE_PROPERTY = "viewType";
	
	public static final String SOURCE_APP_PROPERTY = "sourceApp";
	
	public static final String APP_ID_PROPERTY = "appId";
	
	public static final String TENANT_ID_PROPERTY = "tenantId";
	
	public static final String FORMAL_PROPERTY = "formal";
	
	public static final String PRODUCT_MODE_PROPERTY = "productMode";
	
	//是否使用viewType，特殊情况用
	public static final String USE_VIEW_TYPE = "useViewType";
	
	public static final String MAKE_PC_DIR = "make_pc";
	
	public static final String PC_DIR = "pc";
	
	public static final String MAKE_MOBILE_DIR = "make_mobile";
	
	public static final String MOBILE_DIR = "mobile";
	
	public static String OPEN_API_PMODE_PARAMETER = "pMode";
	
	public static String OPEN_API_FORMAL_PRAMETER = "formal";
	
	/**
	 * 业务线资源类型
	 */
	public static String RESOURCE_UNIT_TYPE_KEY = "uniteType";
	
	/**
	 * 第三方调用openApi标识，用于图片的拼接域名
	 */
	public static String OPEN_API_THIRD_PARTY_PARAMETER = "thirdParty";
	
	/**
	 *   动态切换的数据库前缀，如： SITE，ZCEO_SITE 等
	 */
	public static String DYNAMIC_DB_PREFIX_PROPERTY = "DYNAMIC_DB_PREFIX";
	
	/**
	 *   数据库集群号，默认为0， 为多集群支持备用
	 */
	public static String DYNAMIC_DB_CLUSTER_NUMBER_PROPERTY = "DYNAMIC_DB_CLUSTER_NUMBER";
	
	/**
	 *   是否要动态切换标识
	 */
	public static String DYNAMIC_DB_SWITCH_TAG = "dynamicSwithTag";
	
	/**
	 * UNITTYPE 
	 */
	public static String DYNAMIC_UNIT_TYPE_VALUE = "188888";
	
	/**
	 * 设计器区分产品标识
	 */
	public static final String DESIGN_PRODUCT_KEY = "designProduct";
	
	//api获取数据的范围
	public enum DataRange {
	    ALL, PC, MO;
	}
	
	//动静分离标识值
	public enum DynamicAndStaticFlagEnum {
		NOT_DIFF_DYN_STATIC(0),DIFF_DYN_STATIC(1);
		
		int value;
		DynamicAndStaticFlagEnum(int v){
			this.value = v;
		}
		public int getValue(){
			return value;
		}
	}
	
	  
}
